package org.xqh.test.ugreen.tmdb;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName TMDBData
 * @Description TODO
 * @Author xuqianghui
 * @Date 2025/5/30 11:24
 * @Version 1.0
 */
public class TMDBData {

    public static void main(String[] args) {
        //Tag_video
        buildPersonMsg();
        buildMovieMsg();

    }

    private static void supplementMsgExample(){
        /**
         * {"type":"movie","source":"tmdb","data_type":"id","data":"9799","language":"zh-CN"}
         * {"type":"movie","source":"tmdb","data_type":"id","data":"9799","language":"en-US"}
         * {"type":"tv","source":"tmdb","data_type":"id","data":"76572","language":"zh-CN"}
         * {"type":"tv","source":"tmdb","data_type":"id","data":"76572","language":"en-US"}
         * {"type":"tv_season","source":"tmdb","data_type":"json","data":"{\"id\":1416,\"season\":1}","language":"zh-CN"}
         * {"type":"tv_season","source":"tmdb","data_type":"json","data":"{\"id\":1416,\"season\":1}","language":"en-US"}
         */
    }

    private static void buildPersonMsg(){
        String data = "{\"also_known_as\":[\"Lovely Singh\",\"Lovly Singh\",\"Luvly Singh\",\"Ashya Lovely Singh\",\"Ashya Singh\"],\"gender\":1,\"imdb_id\":\"nm12103226\",\"known_for_department\":\"Acting\",\"profile_path\":\"/a7VUEsMsqs0coBANBeYviTXQc0V.jpg\",\"biography\":\"\",\"popularity\":0.1767,\"name\":\"Ashya\",\"id\":2997769,\"adult\":false}";
        String tvId = "2997769";
        String language = "zh-CN";
        String type = "person";
        String msgId = String.format("relate_%s_%s_%s", type, tvId, language);
        String msgType = String.format("sync-relate#%s", language);
        buildMsg(data, msgId, msgType);
    }

    private static void buildSeasonMsg(){
        String data = "{\"air_date\":\"2025-06-19\",\"overview\":\"漫画家晴田真帆有一个秘密，那就是她根据高中时代的学长雪岛周留下的漫画设定创作了自己的作品。真帆强烈地想将作品还给10年前去世的雪岛，某天晚上，不可思议的事情发生了。回到高中时代的真帆带着后悔的心情再次成为高中生。然而在过去的世界上，关于雪岛死亡的某个真相被发现，谜团变得更加扑朔迷离。\",\"episode_count\":1,\"vote_average\":0.0,\"name\":\"第 1 季\",\"season_number\":1,\"id\":458584}";
        String tvId = "458584";
        String language = "zh-CN";
        String type = "season";
        String msgId = String.format("relate_%s_%s_%s", type, tvId, language);
        String msgType = String.format("sync-relate#%s", language);
        buildMsg(data, msgId, msgType);
    }

    private static void buildMovieMsg(){
//        String data = "{\"original_language\":\"zh\",\"video\":false,\"title\":\"德云社烧饼相声专场沈阳站\",\"alternative_titles\":{\"titles\":[]},\"revenue\":0,\"credits\":{\"cast\":[],\"crew\":[]},\"genres\":[],\"translations\":{\"translations\":[{\"data\":{\"overview\":\"《德云社烧饼相声专场沈阳站》是德云社相声演员烧饼的相声专场秀。烧饼凭借深厚的表演功底被观众所喜爱，而他的夸张表演风格更是被人津津乐道，喜欢烧饼的朋友们可千万不要错过他的相声专场秀哦！\",\"runtime\":0,\"tagline\":\"\",\"title\":\"\",\"homepage\":\"\"},\"iso_3166_1\":\"CN\",\"name\":\"普通话\",\"iso_639_1\":\"zh\",\"english_name\":\"Mandarin\"}]},\"popularity\":0.0143,\"production_countries\":[],\"id\":921147,\"vote_count\":0,\"budget\":0,\"overview\":\"《德云社烧饼相声专场沈阳站》是德云社相声演员烧饼的相声专场秀。烧饼凭借深厚的表演功底被观众所喜爱，而他的夸张表演风格更是被人津津乐道，喜欢烧饼的朋友们可千万不要错过他的相声专场秀哦！\",\"images\":{\"backdrops\":[],\"posters\":[],\"logos\":[]},\"original_title\":\"德云社烧饼相声专场沈阳站\",\"runtime\":0,\"poster_path\":\"/A0rZ8mrb1nOsoO05v3DLevpA1ko.jpg\",\"origin_country\":[\"CN\"],\"spoken_languages\":[],\"production_companies\":[],\"release_date\":\"2017-10-23\",\"vote_average\":0.0,\"tagline\":\"\",\"adult\":false,\"homepage\":\"\",\"status\":\"Released\"}";
//        String tvId = "921147";
        String data = "{\"original_language\":\"en\",\"imdb_id\":\"tt5737840\",\"video\":false,\"title\":\"遇上中国女孩\",\"backdrop_path\":\"/nCr3xlx31gW5dY9eETd3zNxxQbV.jpg\",\"alternative_titles\":{\"titles\":[{\"iso_3166_1\":\"US\",\"title\":\"Midnight Driver\",\"type\":\"\"},{\"iso_3166_1\":\"GB\",\"title\":\"Siji: Driver\",\"type\":\"\"}]},\"revenue\":0,\"credits\":{\"cast\":[{\"cast_id\":7,\"character\":\"Sam\",\"gender\":2,\"credit_id\":\"5ab2f5b59251411bf0001847\",\"known_for_department\":\"Acting\",\"original_name\":\"Patrick Duke Conboy\",\"popularity\":0.426,\"name\":\"Patrick Duke Conboy\",\"profile_path\":\"/fkRdHpb4p7RwrEt1DkaCNSrkzJp.jpg\",\"id\":2004536,\"adult\":false,\"order\":0},{\"cast_id\":0,\"character\":\"Lily\",\"gender\":1,\"credit_id\":\"5ab2f4849251411bf00016dd\",\"known_for_department\":\"Acting\",\"original_name\":\"Candice Zhao\",\"popularity\":0.7131,\"name\":\"Candice Zhao\",\"profile_path\":\"/nMuwKQV6IAPe5PFVAXDGTdveFae.jpg\",\"id\":1744759,\"adult\":false,\"order\":1},{\"cast_id\":6,\"character\":\"Ricky\",\"gender\":0,\"credit_id\":\"5ab2f58ac3a36863d300167d\",\"known_for_department\":\"Acting\",\"original_name\":\"Richie Ng\",\"popularity\":0.6,\"name\":\"Richie Ng\",\"id\":2004535,\"adult\":false,\"order\":2},{\"cast_id\":1,\"character\":\"Detective\",\"gender\":2,\"credit_id\":\"5ab2f49f0e0a267e6d001944\",\"known_for_department\":\"Acting\",\"original_name\":\"Lou Martini Jr.\",\"popularity\":1.7221,\"name\":\"Lou Martini Jr.\",\"profile_path\":\"/85s5KR0BA6dhMJtOrvtKGY8Bz8E.jpg\",\"id\":106187,\"adult\":false,\"order\":3},{\"cast_id\":3,\"character\":\"Dispatcher\",\"gender\":2,\"credit_id\":\"5ab2f5040e0a267e67001bcc\",\"known_for_department\":\"Acting\",\"original_name\":\"Stephen Lin\",\"popularity\":0.552,\"name\":\"Stephen Lin\",\"profile_path\":\"/ra6LO6SfU5RI9oaZQCzX91M1iMH.jpg\",\"id\":1662555,\"adult\":false,\"order\":4},{\"cast_id\":4,\"character\":\"Man in Park\",\"gender\":2,\"credit_id\":\"5ab2f553c3a36863d300162f\",\"known_for_department\":\"Acting\",\"original_name\":\"Gilbrando Acevedo\",\"popularity\":0.539,\"name\":\"Gilbrando Acevedo\",\"profile_path\":\"/mMYpVQEJ5NpSMlL0TT118DqG521.jpg\",\"id\":2004533,\"adult\":false,\"order\":5},{\"cast_id\":5,\"character\":\"Airbnb Man\",\"gender\":0,\"credit_id\":\"5ab2f56fc3a3686398001814\",\"known_for_department\":\"Acting\",\"original_name\":\"JR Carter\",\"popularity\":0.678,\"name\":\"JR Carter\",\"profile_path\":\"/OdTsppaoNEBoKBCVJQOz3n26gX.jpg\",\"id\":1116939,\"adult\":false,\"order\":6}],\"crew\":[{\"gender\":0,\"credit_id\":\"635a24df87e63e0089aea017\",\"known_for_department\":\"Directing\",\"original_name\":\"David Chai\",\"popularity\":0.1865,\"name\":\"David Chai\",\"id\":1974064,\"adult\":false,\"department\":\"Directing\",\"job\":\"Director\"},{\"gender\":0,\"credit_id\":\"65c91f58a93d2501494aebc8\",\"known_for_department\":\"Directing\",\"original_name\":\"David Chai\",\"popularity\":0.1865,\"name\":\"David Chai\",\"id\":1974064,\"adult\":false,\"department\":\"Writing\",\"job\":\"Writer\"},{\"gender\":0,\"credit_id\":\"65c91f739451e701637b35be\",\"known_for_department\":\"Sound\",\"original_name\":\"Tasos Eliopoulos\",\"popularity\":0.1822,\"name\":\"Tasos Eliopoulos\",\"id\":2097722,\"adult\":false,\"department\":\"Sound\",\"job\":\"Original Music Composer\"},{\"gender\":2,\"credit_id\":\"65c91fc0aad9c2017db8904a\",\"known_for_department\":\"Camera\",\"original_name\":\"Alberto Innella\",\"popularity\":0.2125,\"name\":\"Alberto Innella\",\"profile_path\":\"/7Hghkps8OgjyvT5EfJI0wCuZBDM.jpg\",\"id\":3742193,\"adult\":false,\"department\":\"Camera\",\"job\":\"Assistant Camera\"},{\"gender\":2,\"credit_id\":\"65c91f7f266778017c596298\",\"known_for_department\":\"Camera\",\"original_name\":\"Christopher Raymond\",\"popularity\":1.9978,\"name\":\"Christopher Raymond\",\"id\":1411843,\"adult\":false,\"department\":\"Camera\",\"job\":\"Director of Photography\"},{\"gender\":0,\"credit_id\":\"65c91f8a4350110162e858c8\",\"known_for_department\":\"Camera\",\"original_name\":\"Jack Armellin\",\"popularity\":0.0773,\"name\":\"Jack Armellin\",\"id\":3920133,\"adult\":false,\"department\":\"Art\",\"job\":\"Production Design\"},{\"gender\":0,\"credit_id\":\"65c91f983c3ab00184ceffdb\",\"known_for_department\":\"Art\",\"original_name\":\"Pushen Li\",\"popularity\":0.071,\"name\":\"Pushen Li\",\"id\":4530946,\"adult\":false,\"department\":\"Art\",\"job\":\"Production Design\"},{\"gender\":0,\"credit_id\":\"65c91fafa93d2501494aebec\",\"known_for_department\":\"Costume & Make-Up\",\"original_name\":\"Marquita Lopez\",\"popularity\":0.167,\"name\":\"Marquita Lopez\",\"id\":1847568,\"adult\":false,\"department\":\"Costume & Make-Up\",\"job\":\"Costume Design\"},{\"gender\":0,\"credit_id\":\"65c91f6526677801635827a0\",\"known_for_department\":\"Production\",\"original_name\":\"Joe Wang\",\"popularity\":0.1923,\"name\":\"Joe Wang\",\"id\":2618051,\"adult\":false,\"department\":\"Production\",\"job\":\"Producer\"}]},\"genres\":[{\"name\":\"剧情\",\"id\":18},{\"name\":\"爱情\",\"id\":10749}],\"translations\":{\"translations\":[{\"data\":{\"overview\":\"After a driver rescues a passenger from an abusive boyfriend, he discovers she is a human trafficking victim. But in order to free her, he must give up the thing he loves the most.\",\"runtime\":87,\"tagline\":\"\",\"title\":\"\",\"homepage\":\"\"},\"iso_3166_1\":\"US\",\"name\":\"English\",\"iso_639_1\":\"en\",\"english_name\":\"English\"},{\"data\":{\"overview\":\"샘은 돈을 모아 집을 살 꿈을 꾸며 운전을 하며 살고 있다.  그런 샘이 릴리라는 신비한 중국여자를 만나고 폭행을 당하는 릴리를 구해 자신의 집으로 데려와 보호해 준다. 점점 릴리에게 빠져드는 샘은 릴 리가 인신매매로 인해 성매매를 강요 당하고 있다는 사실을 알게 된다. 릴리를 구하기 위해 위험한 거래를 하게 되는데….\",\"runtime\":0,\"tagline\":\"\",\"title\":\"마이애미 드라이버\",\"homepage\":\"\"},\"iso_3166_1\":\"KR\",\"name\":\"한국어/조선말\",\"iso_639_1\":\"ko\",\"english_name\":\"Korean\"},{\"data\":{\"overview\":\"中国姑娘在美国收到迫害被一名美国司机所救下，两人在相处中渐生好感。但随着互相的了解，美国司机逐渐打开了这个中国姑娘背后的秘密。为了能够让这个中国姑娘重获自由，他不得不做出一系列的选择与决定...\",\"runtime\":88,\"tagline\":\"\",\"title\":\"遇上中国女孩\",\"homepage\":\"\"},\"iso_3166_1\":\"CN\",\"name\":\"普通话\",\"iso_639_1\":\"zh\",\"english_name\":\"Mandarin\"}]},\"popularity\":0.2461,\"production_countries\":[{\"iso_3166_1\":\"US\",\"name\":\"United States of America\"}],\"id\":513286,\"vote_count\":1,\"budget\":0,\"overview\":\"中国姑娘在美国收到迫害被一名美国司机所救下，两人在相处中渐生好感。但随着互相的了解，美国司机逐渐打开了这个中国姑娘背后的秘密。为了能够让这个中国姑娘重获自由，他不得不做出一系列的选择与决定...\",\"images\":{\"backdrops\":[],\"posters\":[],\"logos\":[]},\"original_title\":\"Midnight Driver\",\"runtime\":88,\"poster_path\":\"/gX3wCBtnX1MA87gy47oTPBusv2C.jpg\",\"origin_country\":[\"US\"],\"spoken_languages\":[{\"name\":\"English\",\"iso_639_1\":\"en\",\"english_name\":\"English\"}],\"production_companies\":[],\"release_date\":\"2018-07-16\",\"vote_average\":5.0,\"tagline\":\"\",\"adult\":false,\"homepage\":\"\",\"status\":\"Released\"}";
        String tvId = "513286";
        String language = "zh-CN";
        String type = "movie";
        String msgId = String.format("%s_%s_%s", type, tvId, language);
        String msgType = String.format("sync-%s#%s", type, language);
        buildMsg(data, msgId, msgType);
    }

    private static void buildTVMsg(){
        String tvData = "{\"original_language\":\"es\",\"number_of_episodes\":4,\"aggregate_credits\":{\"cast\":[{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Harold Torres\",\"popularity\":2.0021,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06ef817b5ef0162b7f034\"}],\"name\":\"Harold Torres\",\"profile_path\":\"/lOAED2Que041vtPP0bKuBYE2xVr.jpg\",\"id\":234070,\"adult\":false,\"order\":0},{\"total_episode_count\":1,\"gender\":1,\"known_for_department\":\"Acting\",\"original_name\":\"Mayra Hermosillo\",\"popularity\":1.1349,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f0032489b01879c6307\"}],\"name\":\"Mayra Hermosillo\",\"profile_path\":\"/3EFBG83M8YOPUynZv6QDsJZPjdu.jpg\",\"id\":1526350,\"adult\":false,\"order\":1},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Manuel Masalva\",\"popularity\":1.3754,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f1cfcec2e017a8324cf\"}],\"name\":\"Manuel Masalva\",\"profile_path\":\"/mqf7pWyiZLovaSRlUJzoqsV2PG2.jpg\",\"id\":2229075,\"adult\":false,\"order\":2},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Andrew Leland Rogers\",\"popularity\":0.2231,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f244557a0018529cb1a\"}],\"name\":\"Andrew Leland Rogers\",\"profile_path\":\"/uURYtlsWZbQBm2QyEvhnkreJfNy.jpg\",\"id\":1432420,\"adult\":false,\"order\":3},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Héctor Kotsifakis\",\"popularity\":1.1975,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f2a32489b01649bded2\"}],\"name\":\"Hector Kotsifakis\",\"profile_path\":\"/yMlCG0Yqigqo1dg8SCBrwUrjW8H.jpg\",\"id\":133766,\"adult\":false,\"order\":4},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Dagoberto Gama\",\"popularity\":0.982,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f311f748b0161515920\"}],\"name\":\"Dagoberto Gama\",\"profile_path\":\"/gVobDr7rVx58LHnB5WVyExiTUjS.jpg\",\"id\":127825,\"adult\":false,\"order\":5},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Acting\",\"original_name\":\"Regina Nava\",\"popularity\":0.1533,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f3b17b5ef0185b8c927\"}],\"name\":\"Regina Nava\",\"id\":4500801,\"adult\":false,\"order\":6},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Sebastian Roché\",\"popularity\":3.4732,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06ef10e29a20148374af6\"}],\"name\":\"Sebastian Roché\",\"profile_path\":\"/cP3RxXiMeMyhhNpacoXZskbcNKa.jpg\",\"id\":23789,\"adult\":false,\"order\":7},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"Gerardo Trejoluna\",\"popularity\":0.4788,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f49d29bdd013144b3d1\"}],\"name\":\"Gerardo Trejoluna\",\"profile_path\":\"/fJzcjj3JrARh3iQEx5lMbCEfRKq.jpg\",\"id\":1301522,\"adult\":false,\"order\":8},{\"total_episode_count\":1,\"gender\":1,\"known_for_department\":\"Acting\",\"original_name\":\"Paulina Dávila\",\"popularity\":0.6252,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06f501f748b014550d7a0\"}],\"name\":\"Paulina Dávila\",\"profile_path\":\"/2kRoqJjcQE9V1jHg7wCXuvXbUO.jpg\",\"id\":1193083,\"adult\":false,\"order\":9},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Acting\",\"original_name\":\"José María Yázpik\",\"popularity\":2.5921,\"roles\":[{\"character\":\"\",\"episode_count\":1,\"credit_id\":\"65f06ee94557a0018529cad1\"}],\"name\":\"José María Yázpik\",\"profile_path\":\"/uqZE7oXEADJ1NTg7g7xRELw59Hy.jpg\",\"id\":72128,\"adult\":false,\"order\":10}],\"crew\":[{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Production\",\"original_name\":\"Stacy Perskie\",\"popularity\":1.3868,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca3f6506dee7c1a0561bd\",\"job\":\"Executive Producer\"}],\"name\":\"Stacy Perskie\",\"id\":1026247,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Production\",\"original_name\":\"Kristen Zolner\",\"popularity\":0.1304,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"65f07590e19de9014bb81bd3\",\"job\":\"Executive Producer\"}],\"name\":\"Kristen Zolner\",\"id\":1373058,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Production\",\"original_name\":\"Brian Grazer\",\"popularity\":2.9523,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"65f0755a0e29a2017b38b23d\",\"job\":\"Executive Producer\"}],\"name\":\"Brian Grazer\",\"profile_path\":\"/rNFUflKlpTEbnWDHd2Of293E4lx.jpg\",\"id\":339,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Production\",\"original_name\":\"Rafael Ley\",\"popularity\":0.2721,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca4000d0d8dc827e98164\",\"job\":\"Executive Producer\"}],\"name\":\"Rafael Ley\",\"id\":1572666,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Directing\",\"original_name\":\"Ron Howard\",\"popularity\":5.5046,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"65f075871f748b0161515c25\",\"job\":\"Executive Producer\"}],\"name\":\"Ron Howard\",\"profile_path\":\"/g3n8qduLaPO2l4kJZsV6xNMXozn.jpg\",\"id\":6159,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Production\",\"original_name\":\"Pamela Toro Moreno\",\"popularity\":0.2504,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca41a506dee7c1a0561dc\",\"job\":\"Executive Producer\"}],\"name\":\"Pamela Toro Moreno\",\"id\":2558838,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":2,\"known_for_department\":\"Directing\",\"original_name\":\"Adrian Grünberg\",\"popularity\":1.2986,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca40978f0cd489173a1e9\",\"job\":\"Executive Producer\"}],\"name\":\"Adrian Grünberg\",\"profile_path\":\"/ubhQE5F4orGeAuQYN1PoY8ZJc3n.jpg\",\"id\":589402,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":1,\"known_for_department\":\"Production\",\"original_name\":\"Stephanie 'Tuty' Correa\",\"popularity\":0.1476,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca4250d0d8dc827e9817c\",\"job\":\"Executive Producer\"}],\"name\":\"Stephanie 'Tuty' Correa\",\"id\":2164766,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Creator\",\"original_name\":\"Jorge Dorantes\",\"popularity\":0.1077,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca42d78f0cd489173a1f3\",\"job\":\"Executive Producer\"}],\"name\":\"Jorge Dorantes\",\"id\":1942544,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Production\",\"original_name\":\"Mariana Aceves\",\"popularity\":0.2322,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"673ca41115333e736195df1e\",\"job\":\"Executive Producer\"}],\"name\":\"Mariana Aceves\",\"id\":1572769,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Production\",\"original_name\":\"Luis Rosales\",\"popularity\":0.2933,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"65f0ddcffbe36f0162ecf13c\",\"job\":\"Casting\"}],\"name\":\"Luis Rosales\",\"id\":1768069,\"adult\":false,\"department\":\"Production\"},{\"total_episode_count\":1,\"gender\":0,\"known_for_department\":\"Writing\",\"original_name\":\"Kevin Sieff\",\"popularity\":0.0286,\"jobs\":[{\"episode_count\":1,\"credit_id\":\"65f0dd6cd64ac201875d049c\",\"job\":\"Other\"}],\"name\":\"Kevin Sieff\",\"id\":4587779,\"adult\":false,\"department\":\"Writing\"}]},\"networks\":[{\"logo_path\":\"/wwemzKWzjKYJFfCeiB57q3r4Bcm.png\",\"name\":\"Netflix\",\"id\":213,\"origin_country\":\"\"}],\"type\":\"Scripted\",\"backdrop_path\":\"/unaG6566NLCKUMjDaWDH9UDXQ4i.jpg\",\"alternative_titles\":{\"results\":[]},\"credits\":{\"cast\":[{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06ef817b5ef0162b7f034\",\"known_for_department\":\"Acting\",\"original_name\":\"Harold Torres\",\"popularity\":2.0021,\"name\":\"Harold Torres\",\"profile_path\":\"/lOAED2Que041vtPP0bKuBYE2xVr.jpg\",\"id\":234070,\"adult\":false,\"order\":0},{\"character\":\"\",\"gender\":1,\"credit_id\":\"65f06f0032489b01879c6307\",\"known_for_department\":\"Acting\",\"original_name\":\"Mayra Hermosillo\",\"popularity\":1.1349,\"name\":\"Mayra Hermosillo\",\"profile_path\":\"/3EFBG83M8YOPUynZv6QDsJZPjdu.jpg\",\"id\":1526350,\"adult\":false,\"order\":1},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06f1cfcec2e017a8324cf\",\"known_for_department\":\"Acting\",\"original_name\":\"Manuel Masalva\",\"popularity\":1.3754,\"name\":\"Manuel Masalva\",\"profile_path\":\"/mqf7pWyiZLovaSRlUJzoqsV2PG2.jpg\",\"id\":2229075,\"adult\":false,\"order\":2},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06f244557a0018529cb1a\",\"known_for_department\":\"Acting\",\"original_name\":\"Andrew Leland Rogers\",\"popularity\":0.2231,\"name\":\"Andrew Leland Rogers\",\"profile_path\":\"/uURYtlsWZbQBm2QyEvhnkreJfNy.jpg\",\"id\":1432420,\"adult\":false,\"order\":3},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06f2a32489b01649bded2\",\"known_for_department\":\"Acting\",\"original_name\":\"Héctor Kotsifakis\",\"popularity\":1.1975,\"name\":\"Hector Kotsifakis\",\"profile_path\":\"/yMlCG0Yqigqo1dg8SCBrwUrjW8H.jpg\",\"id\":133766,\"adult\":false,\"order\":4},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06f311f748b0161515920\",\"known_for_department\":\"Acting\",\"original_name\":\"Dagoberto Gama\",\"popularity\":0.982,\"name\":\"Dagoberto Gama\",\"profile_path\":\"/gVobDr7rVx58LHnB5WVyExiTUjS.jpg\",\"id\":127825,\"adult\":false,\"order\":5},{\"character\":\"\",\"gender\":0,\"credit_id\":\"65f06f3b17b5ef0185b8c927\",\"known_for_department\":\"Acting\",\"original_name\":\"Regina Nava\",\"popularity\":0.1533,\"name\":\"Regina Nava\",\"id\":4500801,\"adult\":false,\"order\":6},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06ef10e29a20148374af6\",\"known_for_department\":\"Acting\",\"original_name\":\"Sebastian Roché\",\"popularity\":3.4732,\"name\":\"Sebastian Roché\",\"profile_path\":\"/cP3RxXiMeMyhhNpacoXZskbcNKa.jpg\",\"id\":23789,\"adult\":false,\"order\":7},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06f49d29bdd013144b3d1\",\"known_for_department\":\"Acting\",\"original_name\":\"Gerardo Trejoluna\",\"popularity\":0.4788,\"name\":\"Gerardo Trejoluna\",\"profile_path\":\"/fJzcjj3JrARh3iQEx5lMbCEfRKq.jpg\",\"id\":1301522,\"adult\":false,\"order\":8},{\"character\":\"\",\"gender\":1,\"credit_id\":\"65f06f501f748b014550d7a0\",\"known_for_department\":\"Acting\",\"original_name\":\"Paulina Dávila\",\"popularity\":0.6252,\"name\":\"Paulina Dávila\",\"profile_path\":\"/2kRoqJjcQE9V1jHg7wCXuvXbUO.jpg\",\"id\":1193083,\"adult\":false,\"order\":9},{\"character\":\"\",\"gender\":2,\"credit_id\":\"65f06ee94557a0018529cad1\",\"known_for_department\":\"Acting\",\"original_name\":\"José María Yázpik\",\"popularity\":2.5921,\"name\":\"José María Yázpik\",\"profile_path\":\"/uqZE7oXEADJ1NTg7g7xRELw59Hy.jpg\",\"id\":72128,\"adult\":false,\"order\":10}],\"crew\":[{\"gender\":2,\"credit_id\":\"65f0755a0e29a2017b38b23d\",\"known_for_department\":\"Production\",\"original_name\":\"Brian Grazer\",\"popularity\":2.9523,\"name\":\"Brian Grazer\",\"profile_path\":\"/rNFUflKlpTEbnWDHd2Of293E4lx.jpg\",\"id\":339,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":2,\"credit_id\":\"65f075871f748b0161515c25\",\"known_for_department\":\"Directing\",\"original_name\":\"Ron Howard\",\"popularity\":5.5046,\"name\":\"Ron Howard\",\"profile_path\":\"/g3n8qduLaPO2l4kJZsV6xNMXozn.jpg\",\"id\":6159,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":0,\"credit_id\":\"65f07590e19de9014bb81bd3\",\"known_for_department\":\"Production\",\"original_name\":\"Kristen Zolner\",\"popularity\":0.1304,\"name\":\"Kristen Zolner\",\"id\":1373058,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":0,\"credit_id\":\"65f0dd6cd64ac201875d049c\",\"known_for_department\":\"Writing\",\"original_name\":\"Kevin Sieff\",\"popularity\":0.0286,\"name\":\"Kevin Sieff\",\"id\":4587779,\"adult\":false,\"department\":\"Writing\",\"job\":\"Other\"},{\"gender\":0,\"credit_id\":\"65f0ddcffbe36f0162ecf13c\",\"known_for_department\":\"Production\",\"original_name\":\"Luis Rosales\",\"popularity\":0.2933,\"name\":\"Luis Rosales\",\"id\":1768069,\"adult\":false,\"department\":\"Production\",\"job\":\"Casting\"},{\"gender\":2,\"credit_id\":\"673ca3f6506dee7c1a0561bd\",\"known_for_department\":\"Production\",\"original_name\":\"Stacy Perskie\",\"popularity\":1.3868,\"name\":\"Stacy Perskie\",\"id\":1026247,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":0,\"credit_id\":\"673ca4000d0d8dc827e98164\",\"known_for_department\":\"Production\",\"original_name\":\"Rafael Ley\",\"popularity\":0.2721,\"name\":\"Rafael Ley\",\"id\":1572666,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":2,\"credit_id\":\"673ca40978f0cd489173a1e9\",\"known_for_department\":\"Directing\",\"original_name\":\"Adrian Grünberg\",\"popularity\":1.2986,\"name\":\"Adrian Grünberg\",\"profile_path\":\"/ubhQE5F4orGeAuQYN1PoY8ZJc3n.jpg\",\"id\":589402,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":0,\"credit_id\":\"673ca41115333e736195df1e\",\"known_for_department\":\"Production\",\"original_name\":\"Mariana Aceves\",\"popularity\":0.2322,\"name\":\"Mariana Aceves\",\"id\":1572769,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":0,\"credit_id\":\"673ca41a506dee7c1a0561dc\",\"known_for_department\":\"Production\",\"original_name\":\"Pamela Toro Moreno\",\"popularity\":0.2504,\"name\":\"Pamela Toro Moreno\",\"id\":2558838,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":1,\"credit_id\":\"673ca4250d0d8dc827e9817c\",\"known_for_department\":\"Production\",\"original_name\":\"Stephanie 'Tuty' Correa\",\"popularity\":0.1476,\"name\":\"Stephanie 'Tuty' Correa\",\"id\":2164766,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"},{\"gender\":0,\"credit_id\":\"673ca42d78f0cd489173a1f3\",\"known_for_department\":\"Creator\",\"original_name\":\"Jorge Dorantes\",\"popularity\":0.1077,\"name\":\"Jorge Dorantes\",\"id\":1942544,\"adult\":false,\"department\":\"Production\",\"job\":\"Executive Producer\"}]},\"genres\":[{\"name\":\"Crime\",\"id\":80}],\"translations\":{\"translations\":[{\"data\":{\"overview\":\"This elite Mexican police squad has a unique mission: to capture American fugitives who flee south across the border. Inspired by true events.\",\"name\":\"The Gringo Hunters\",\"tagline\":\"\",\"homepage\":\"\"},\"iso_3166_1\":\"US\",\"name\":\"English\",\"iso_639_1\":\"en\",\"english_name\":\"English\"},{\"data\":{\"overview\":\"Este escuadrón mexicano de policía de élite tiene una misión única: capturar a fugitivos estadounidenses que huyen hacia el sur, cruzando la frontera. Inspirada en hechos reales.\",\"name\":\"\",\"tagline\":\"\",\"homepage\":\"\"},\"iso_3166_1\":\"MX\",\"name\":\"Español\",\"iso_639_1\":\"es\",\"english_name\":\"Spanish\"},{\"data\":{\"overview\":\"Dit elite Mexicaanse politieteam heeft een unieke missie: het oppakken van Amerikaanse voortvluchtigen die de grens over vluchten. Geïnspireerd op ware gebeurtenissen.\",\"name\":\"\",\"tagline\":\"\",\"homepage\":\"\"},\"iso_3166_1\":\"BE\",\"name\":\"Nederlands\",\"iso_639_1\":\"nl\",\"english_name\":\"Dutch\"},{\"data\":{\"overview\":\"Dit elite Mexicaanse politieteam heeft een unieke missie: het oppakken van Amerikaanse voortvluchtigen die de grens over vluchten. Geïnspireerd op ware gebeurtenissen.\",\"name\":\"\",\"tagline\":\"\",\"homepage\":\"\"},\"iso_3166_1\":\"NL\",\"name\":\"Nederlands\",\"iso_639_1\":\"nl\",\"english_name\":\"Dutch\"}]},\"popularity\":1.1287,\"production_countries\":[{\"iso_3166_1\":\"MX\",\"name\":\"Mexico\"},{\"iso_3166_1\":\"US\",\"name\":\"United States of America\"}],\"id\":246026,\"number_of_seasons\":1,\"vote_count\":0,\"first_air_date\":\"2025-07-09\",\"overview\":\"This elite Mexican police squad has a unique mission: to capture American fugitives who flee south across the border. Inspired by true events.\",\"seasons\":[{\"air_date\":\"2025-07-09\",\"overview\":\"\",\"episode_count\":4,\"vote_average\":0.0,\"name\":\"Season 1\",\"season_number\":1,\"id\":378431}],\"images\":{\"backdrops\":[],\"posters\":[],\"logos\":[]},\"languages\":[\"en\",\"es\"],\"created_by\":[],\"external_ids\":{\"imdb_id\":\"tt31220187\",\"tvdb_id\":447414},\"origin_country\":[\"MX\",\"US\"],\"spoken_languages\":[{\"name\":\"English\",\"iso_639_1\":\"en\",\"english_name\":\"English\"},{\"name\":\"Español\",\"iso_639_1\":\"es\",\"english_name\":\"Spanish\"}],\"production_companies\":[{\"logo_path\":\"/hfN4ipPEuJCU94gL8VOGIF0YixG.png\",\"name\":\"Woo Films\",\"id\":29608,\"origin_country\":\"MX\"},{\"logo_path\":\"/bSxCLP0hx6F9XzqaReXdEohJZ9y.png\",\"name\":\"Redrum\",\"id\":41921,\"origin_country\":\"MX\"},{\"logo_path\":\"/bJOFo2ufq7iFC1F4qZm8aLxF5aS.png\",\"name\":\"Imagine Entertainment\",\"id\":23,\"origin_country\":\"US\"},{\"logo_path\":\"/cTcnyHtt2qTIaBTHqghvDnU5PVc.png\",\"name\":\"The Washington Post\",\"id\":153673,\"origin_country\":\"US\"}],\"original_name\":\"Los gringo hunters\",\"vote_average\":0.0,\"name\":\"The Gringo Hunters\",\"tagline\":\"\",\"episode_run_time\":[],\"content_ratings\":{\"results\":[{\"descriptors\":[],\"iso_3166_1\":\"SG\",\"rating\":\"M18\"}]},\"adult\":false,\"next_episode_to_air\":{\"episode_type\":\"standard\",\"production_code\":\"\",\"overview\":\"\",\"show_id\":246026,\"season_number\":1,\"air_date\":\"2025-07-09\",\"episode_number\":1,\"vote_average\":0.0,\"name\":\"Episode 1\",\"id\":5135893,\"vote_count\":0},\"in_production\":true,\"homepage\":\"https://www.netflix.com/title/81645267\",\"status\":\"In Production\"}";
        String tvId = "246026";
        String language = "en-US";
        String msgId = String.format("%s_%s_%s", "tv", tvId, language);
        String msgType = String.format("sync-tv#%s", language);
        buildMsg(tvData, msgId, msgType);
    }


    private static void buildMsg(String data, String msgId, String msgType){
        TMDBMQMsg msg = TMDBMQMsg.builder()
                .data(data)
                .msgId(msgId)
                .msgType(msgType)
                .ts(System.currentTimeMillis())
                .build();
        System.out.println(JSON.toJSONString(msg));
    }


    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TMDBMQMsg{
        private String msgType;
        private String msgId;
        private Long ts;
        private String data;
    }
}
